package com.spark.prepareJob.tags
import com.spark.beans.Logs
import com.spark.prepareJob.constants.AdConstants

/**
  * 地域标签（省标签格式：ZPxxx->1，地市标签格式：ZCxxx->1）xxx为省或市名称
  * 省：Provincename
  * 市：cityname
  */
object AreaTags extends Tags {
  override def extractTags(log: Logs): Map[String, Int] = {
    val provincename = log.provincename
    val cityname = log.cityname
    Map[String,Int](
      AdConstants.AD_PREFIX_PROVINCE + provincename ->1,
      AdConstants.AD_PREFIX_CITY + cityname ->1
    )
  }
}
